package com.yc.edu.dao;
import com.yc.edu.pojo.UserVO;
import com.yc.edu.vo.UserOnLine;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yc.edu.pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserDAO extends BaseMapper<User> {
    // 通过用户名获得信息
    UserOnLine getOnlineUser(String username);
    @Insert("insert into user (create_time, username, password,status) VALUES (#{createTime},#{username},#{password},#{status})")
    void registerCommonUser(UserVO user);
    @Select("select * from user where username=#{username} and password=#{password}")
    UserVO loginByMd5(UserVO loginUserNameVO);
}
